package com.example.easycharge.controller;

import com.example.easycharge.entity.Report;
import com.example.easycharge.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("report")
public class ReportController {
    @Autowired
    private ReportService reportService;

    @GetMapping("/admin/realTime")
    public List<Report> getRealTimeReports() {
        return reportService.getRealTimeReports();
    }

}
